updating oE crash_routine
crash_routine
include error.e namespace error public procedure crash_routine(integer func)
specifies a function to be called when an error takes place at run time.
Parameters:
- func : an integer, the routine_id of the function to link in.
Comments:
The supplied function must have only one argument, which should be integer or more general. Defaulted parameters in crash routines are not supported yet.
Euphoria maintains a linked list of routines to execute upon a crash. crash_routine adds a new function to the list. The routines defined first are executed last. You cannot unlink a routine once it is linked, nor inspect the crash routine chain.
Currently, the crash routines are pass zero. Future versions may attempt to convey more information to them. If a crash routine returns anything else than zero, the remaining routines in the chain are skipped.
Crash routines are not fully fledged exception handlers, and they cannot resume execution at current or next statement. However, they can read the generated crash file, and might perform any action, including restarting the program.
Example 1:
function report_error(integer dummy) mylib:email("maintainer@remote_site.org", "ex.err") return 0 and dummy end function crash_routine(routine_id("report_error"))
See Also:
Not Categorized, Please Help
|